package cn.com.huzo.model.entities.workflow;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 采购订单审核规则实体类
 *
 * @author 吴旭
 */
public class ApprovalRulePoEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 3341676083371248758L;
    private Long RuleId;
    private Integer PurchasedBy;
    private String PurchasedByName;
    private Integer SupplierGroupId;
    private String SupplierGroupName;
    private Integer ApprovedBy;
    private String ApprovedByName;
    private String Description;

    public Long getRuleId() {
        return RuleId;
    }

    public Integer getPurchasedBy() {
        return PurchasedBy;
    }

    public String getPurchasedByName() {
        return PurchasedByName;
    }

    public Integer getSupplierGroupId() {
        return SupplierGroupId;
    }

    public String getSupplierGroupName() {
        return SupplierGroupName;
    }

    public Integer getApprovedBy() {
        return ApprovedBy;
    }

    public String getApprovedByName() {
        return ApprovedByName;
    }

    public String getDescription() {
        return Description;
    }

    public void setRuleId(Long RuleId) {
        this.RuleId = RuleId;
    }

    public void setPurchasedBy(Integer PurchasedBy) {
        this.PurchasedBy = PurchasedBy;
    }

    public void setPurchasedByName(String PurchasedByName) {
        this.PurchasedByName = PurchasedByName;
    }

    public void setSupplierGroupId(Integer SupplierGroupId) {
        this.SupplierGroupId = SupplierGroupId;
    }

    public void setSupplierGroupName(String SupplierGroupName) {
        this.SupplierGroupName = SupplierGroupName;
    }

    public void setApprovedBy(Integer ApprovedBy) {
        this.ApprovedBy = ApprovedBy;
    }

    public void setApprovedByName(String ApprovedByName) {
        this.ApprovedByName = ApprovedByName;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ApprovalRulePoEntity)) {
            return false;
        }

        final ApprovalRulePoEntity that = (ApprovalRulePoEntity) o;

        return new EqualsBuilder()
                .append(this.getRuleId(), that.getRuleId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getRuleId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
